package cn.sunshuai.feignclient;

import cn.sunshuai.domain.Movie;
import cn.sunshuai.domain.MovieUser;
import cn.sunshuai.util.AjaxResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class MovieFeignClientFallbackFactory implements FallbackFactory<MovieFeignClient> {


    @Override
    public MovieFeignClient create(Throwable throwable) {

        return new MovieFeignClient() {
            @Override
            public List<Movie> findAll() {
                return null;
            }

            @Override
            public Movie movieBuy(Long id) {
                return null;
            }

            @Override
            public AjaxResult addOrUpdate(MovieUser movieUser) {
                return null;
            }

            @Override
            public AjaxResult addOrUpdateMovie(Movie movie) {
                return null;
            }

            @Override
            public MovieUser findByMovieId(Long id) {
                return null;
            }
        };
    }
}
